import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'

export function getToken() {
  let token = Cookies.get(TokenKey);
  if(!token){
    token = localStorage.getItem('eastoken')
  }
  return token
}

export function setToken(token) {
  localStorage.setItem('eastoken',token)
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  localStorage.removeItem('eastoken')
  return Cookies.remove(TokenKey)
}
